<template>
	<view class="container">
		<view class="header">
			<text class="header-title">剧本杀创作平台</text>
			<text class="header-subtitle">让每个故事都精彩绝伦</text>
		</view>
		
		<scroll-view class="content" scroll-y>
			<view class="feature-section">
				<view class="feature-card" @click="navigateToPolish">
					<image class="feature-icon" src="/static/polish.png" mode="aspectFit"></image>
					<view class="feature-info">
						<text class="feature-title">剧本润色</text>
						<text class="feature-desc">Deepseek R1 满血版，为您的剧本锦上添花</text>
					</view>
				</view>
				
				<view class="feature-card" @click="navigateToTest">
					<image class="feature-icon" src="/static/aitest.png" mode="aspectFit"></image>
					<view class="feature-info">
						<text class="feature-title">AI测本</text>
						<text class="feature-desc">多智能体模拟测本，快速看到剧本效果</text>
					</view>
				</view>
			</view>
			
			<view class="intro-section">
				<text class="intro-title">为什么选择我们？</text>
				<view class="intro-cards">
					<view class="intro-card">
						<text class="intro-card-title">专业智能</text>
						<text class="intro-card-desc">采用先进AI技术，提供专业剧本分析</text>
					</view>
					<view class="intro-card">
						<text class="intro-card-title">便捷高效</text>
						<text class="intro-card-desc">快速处理，实时反馈，提高创作效率</text>
					</view>
					<view class="intro-card">
						<text class="intro-card-title">多端支持</text>
						<text class="intro-card-desc">完美适配Web与App，随时随地使用</text>
					</view>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
			navigateToPolish() {
				// 跳转到剧本润色页面
				uni.navigateTo({
					url: '/pages/polish/polish'
				})
			},
			navigateToTest() {
				// 跳转到AI测本页面
				uni.navigateTo({
					url: '/pages/script_test/script_test'
				})
			}
		}
	}
</script>

<style>
	.container {
		min-height: 100vh;
		position: relative;
	}

	.container::before {
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/static/bg.png') no-repeat center center;
		background-size: cover;
		z-index: -1;
	}
	
	.header {
		padding: 60rpx 40rpx;
		text-align: center;
	}
	
	.header-title {
		font-size: 48rpx;
		color: #ffffff;
		font-weight: bold;
		margin-bottom: 20rpx;
	}
	
	.header-subtitle {
		font-size: 28rpx;
		color: rgba(255, 255, 255, 0.8);
	}
	
	.content {
		height: calc(100vh - 200rpx);
	}
	
	.feature-section {
		padding: 40rpx;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 30rpx;
	}
	
	.feature-card {
		background: rgba(255, 255, 255, 0.15);
		border-radius: 20rpx;
		padding: 30rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		aspect-ratio: 1;
		transition: all 0.3s ease;
		cursor: pointer;
	}
	
	.feature-card:hover {
		transform: scale(1.02);
		background: rgba(255, 255, 255, 0.2);
	}
	
	.feature-card:active {
		transform: scale(0.98);
	}
	
	.feature-icon {
		width: 160rpx;
		height: 160rpx;
		margin-bottom: 30rpx;
		border-radius: 50%;
	}
	
	.feature-info {
		text-align: center;
	}
	
	.feature-title {
		font-size: 36rpx;
		color: #ffffff;
		font-weight: bold;
		margin-bottom: 10rpx;
		display: block;
	}
	
	.feature-desc {
		font-size: 26rpx;
		color: rgba(255, 255, 255, 0.7);
		display: block;
	}
	
	.intro-section {
		padding: 40rpx;
		background: rgba(0, 0, 0, 0.2);
	}
	
	.intro-title {
		font-size: 40rpx;
		color: #ffffff;
		font-weight: bold;
		margin-bottom: 40rpx;
		display: block;
		text-align: center;
	}
	
	.intro-cards {
		display: flex;
		flex-direction: column;
		gap: 30rpx;
	}
	
	.intro-card {
		background: rgba(255, 255, 255, 0.15);
		border-radius: 16rpx;
		padding: 30rpx;
	}
	
	.intro-card-title {
		font-size: 32rpx;
		color: #ffffff;
		font-weight: bold;
		margin-bottom: 10rpx;
		display: block;
	}
	
	.intro-card-desc {
		font-size: 26rpx;
		color: rgba(255, 255, 255, 0.7);
		display: block;
	}
	
	/* 适配H5端 */
	@media screen and (min-width: 768px) {
		.feature-section {
			max-width: 1200rpx;
			margin: 0 auto;
		}
		
		.intro-cards {
			flex-direction: row;
			flex-wrap: wrap;
		}
		
		.intro-card {
			flex: 1;
			min-width: 300rpx;
		}
	}
</style>
